package com.sparrow.resource;

import com.sparrow.common.thread.IdExecutorGroup;
import com.sparrow.event.api.EventBus;
import com.sparrow.resource.service.ResourceService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.sparrow.resource")
public class SparrowResourceAutoConfig {
    @Bean
    public ResourceService resourceService(EventBus eventBus, IdExecutorGroup idExecutorGroup) {
        ResourceService resourceCacheService = new ResourceService(eventBus, idExecutorGroup);
        return resourceCacheService;
    }
}

